# Contributor: Ivan Tham <pickfire@riseup.net>
# Maintainer: Ivan Tham <pickfire@riseup.net>
pkgname=ydcv
pkgver=0.7
pkgrel=1
pkgdesc="YouDao Console Version - Chinese online translate"
url="https://github.com/felixonmars/ydcv"
arch="noarch"
license="GPL-3.0-only"
depends="python3"
makedepends="py3-setuptools"
subpackages="$pkgname-zsh-completion"
source="ydcv-$pkgver.tar.gz::https://github.com/felixonmars/ydcv/archive/$pkgver.tar.gz"
options="!check"

build() {
	git init
	python3 setup.py build
}

package() {
	python3 setup.py install --root="$pkgdir"
	install -Dm644 "$builddir"/contrib/zsh_completion \
		-t "$pkgdir"/usr/share/zsh/site-functions/_$pkgname
}
sha512sums="04277b2cc586bf19b0cd8cb52c0287ac75b235f72cbab19358a962f14de74f042cc90da1ec7ded06e3ce07a4694a6511599ce9213485ed0e4d40a84d296663bf  ydcv-0.7.tar.gz"
